

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>federatedml.feature package &mdash; FATE 1.0 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> FATE
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">federatedml.feature package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.feature_selection">federatedml.feature.feature_selection module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.imputer">federatedml.feature.imputer module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.instance">federatedml.feature.instance module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.min_max_scaler">federatedml.feature.min_max_scaler module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.one_hot_encoder">federatedml.feature.one_hot_encoder module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.quantile">federatedml.feature.quantile module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.quantile_summaries">federatedml.feature.quantile_summaries module</a></li>
<li><a class="reference internal" href="#federatedml-feature-sampler-module">federatedml.feature.sampler module</a></li>
<li><a class="reference internal" href="#federatedml-feature-scaler-module">federatedml.feature.scaler module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.sparse_vector">federatedml.feature.sparse_vector module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature.standard_scaler">federatedml.feature.standard_scaler module</a></li>
<li><a class="reference internal" href="#module-federatedml.feature">Module contents</a></li>
</ul>
</li>
</ul>
</div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">FATE</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>federatedml.feature package</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/federatedml.feature.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="federatedml-feature-package">
<h1>federatedml.feature package<a class="headerlink" href="#federatedml-feature-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="federatedml.feature.binning.html">federatedml.feature.binning package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.binning.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.binning.html#module-federatedml.feature.binning.base_binning">federatedml.feature.binning.base_binning module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.binning.html#module-federatedml.feature.binning.bucket_binning">federatedml.feature.binning.bucket_binning module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.binning.html#module-federatedml.feature.binning.quantile_binning">federatedml.feature.binning.quantile_binning module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.binning.html#module-federatedml.feature.binning">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html">federatedml.feature.hetero_feature_binning package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html#module-federatedml.feature.hetero_feature_binning.base_feature_binning">federatedml.feature.hetero_feature_binning.base_feature_binning module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html#federatedml-feature-hetero-feature-binning-hetero-binning-guest-module">federatedml.feature.hetero_feature_binning.hetero_binning_guest module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html#federatedml-feature-hetero-feature-binning-hetero-binning-host-module">federatedml.feature.hetero_feature_binning.hetero_binning_host module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_binning.html#module-federatedml.feature.hetero_feature_binning">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html">federatedml.feature.hetero_feature_selection package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html#federatedml-feature-hetero-feature-selection-base-feature-selection-module">federatedml.feature.hetero_feature_selection.base_feature_selection module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html#federatedml-feature-hetero-feature-selection-feature-selection-guest-module">federatedml.feature.hetero_feature_selection.feature_selection_guest module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html#federatedml-feature-hetero-feature-selection-feature-selection-host-module">federatedml.feature.hetero_feature_selection.feature_selection_host module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.hetero_feature_selection.html#module-federatedml.feature.hetero_feature_selection">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="federatedml.feature.test.html">federatedml.feature.test package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="federatedml.feature.test.test_new_binning.html">federatedml.feature.test.test_new_binning package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_binning.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_binning.html#federatedml-feature-test-test-new-binning-hetero-feature-binning-guest-test-module">federatedml.feature.test.test_new_binning.hetero_feature_binning_guest_test module</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_binning.html#federatedml-feature-test-test-new-binning-hetero-feature-binning-host-test-module">federatedml.feature.test.test_new_binning.hetero_feature_binning_host_test module</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_binning.html#module-federatedml.feature.test.test_new_binning">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="federatedml.feature.test.test_new_feature_selection.html">federatedml.feature.test.test_new_feature_selection package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_feature_selection.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_feature_selection.html#federatedml-feature-test-test-new-feature-selection-hetero-feature-selection-guest-test-module">federatedml.feature.test.test_new_feature_selection.hetero_feature_selection_guest_test module</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_feature_selection.html#federatedml-feature-test-test-new-feature-selection-hetero-feature-selection-host-test-module">federatedml.feature.test.test_new_feature_selection.hetero_feature_selection_host_test module</a></li>
<li class="toctree-l4"><a class="reference internal" href="federatedml.feature.test.test_new_feature_selection.html#module-federatedml.feature.test.test_new_feature_selection">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#federatedml-feature-test-bucket-binning-test-module">federatedml.feature.test.bucket_binning_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.feature_select_test">federatedml.feature.test.feature_select_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#federatedml-feature-test-hetero-sampler-guest-test-module">federatedml.feature.test.hetero_sampler_guest_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#federatedml-feature-test-hetero-sampler-host-test-module">federatedml.feature.test.hetero_sampler_host_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.hetero_sampler_test">federatedml.feature.test.hetero_sampler_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.imputer_test">federatedml.feature.test.imputer_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.instance_test">federatedml.feature.test.instance_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.min_max_scaler_test">federatedml.feature.test.min_max_scaler_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.one_hot_test">federatedml.feature.test.one_hot_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.quantile_binning_test">federatedml.feature.test.quantile_binning_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.quantile_summaries_test">federatedml.feature.test.quantile_summaries_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.quantile_test">federatedml.feature.test.quantile_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#federatedml-feature-test-sampler-test-module">federatedml.feature.test.sampler_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.sparse_vector_test">federatedml.feature.test.sparse_vector_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test.standard_scaler_test">federatedml.feature.test.standard_scaler_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.feature.test.html#module-federatedml.feature.test">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-federatedml.feature.feature_selection">
<span id="federatedml-feature-feature-selection-module"></span><h2>federatedml.feature.feature_selection module<a class="headerlink" href="#module-federatedml.feature.feature_selection" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.feature_selection.CoeffOfVarValueFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">CoeffOfVarValueFilter</code><span class="sig-paren">(</span><em>param</em>, <em>cols</em>, <em>statics_obj=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#CoeffOfVarValueFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.CoeffOfVarValueFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>Drop the columns if their coefficient of varaiance is smaller than a threshold.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>param</strong> (<em>CoeffOfVarSelectionParam object</em><em>,</em>) – Parameters that user set.</li>
<li><strong>cols</strong> (<em>list of string</em>) – Specify header of guest variances.</li>
<li><strong>statics_obj</strong> (<em>MultivariateStatisticalSummary object</em><em>, </em><em>default: None</em>) – If those static information has been compute. This can be use as parameter so that no need to
compute again.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.CoeffOfVarValueFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#CoeffOfVarValueFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.CoeffOfVarValueFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.CoeffOfVarValueFilter.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#CoeffOfVarValueFilter.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.CoeffOfVarValueFilter.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.CoeffOfVarValueFilter.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#CoeffOfVarValueFilter.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.CoeffOfVarValueFilter.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.FilterMethod">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">FilterMethod</code><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#FilterMethod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Use for filter columns</p>
<dl class="attribute">
<dt id="federatedml.feature.feature_selection.FilterMethod.cols">
<code class="descname">cols</code><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.cols" title="Permalink to this definition">¶</a></dt>
<dd><p>Col index to do selection</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of int</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="federatedml.feature.feature_selection.FilterMethod.left_cols">
<code class="descname">left_cols</code><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.left_cols" title="Permalink to this definition">¶</a></dt>
<dd><p>k is col_index, value is bool that indicate whether it is left or not.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict,</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="federatedml.feature.feature_selection.FilterMethod.feature_values">
<code class="descname">feature_values</code><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.feature_values" title="Permalink to this definition">¶</a></dt>
<dd><p>k is col_name, v is the value that used to judge whether left or not.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.feature_selection.FilterMethod.filter_one_party">
<em class="property">static </em><code class="descname">filter_one_party</code><span class="sig-paren">(</span><em>party_variances</em>, <em>pick_high</em>, <em>value_threshold</em>, <em>header=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#FilterMethod.filter_one_party"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.filter_one_party" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.FilterMethod.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#FilterMethod.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.FilterMethod.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#FilterMethod.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.FilterMethod.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#FilterMethod.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.FilterMethod.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.IVPercentileFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">IVPercentileFilter</code><span class="sig-paren">(</span><em>iv_param</em>, <em>cols</em>, <em>host_cols</em>, <em>binning_obj</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVPercentileFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVPercentileFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>Drop the columns if their iv is smaller than a threshold of percentile.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>iv_param</strong> (<em>IVSelectionParam object</em><em>,</em>) – Parameters that user set.</li>
<li><strong>cols</strong> (<em>list of string</em>) – Specify header of guest variances.</li>
<li><strong>binning_obj</strong> (<em>Binning object</em>) – Use for collecting iv among all parties.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.IVPercentileFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVPercentileFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVPercentileFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.IVPercentileFilter.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVPercentileFilter.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVPercentileFilter.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.IVPercentileFilter.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVPercentileFilter.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVPercentileFilter.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.IVValueSelectFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">IVValueSelectFilter</code><span class="sig-paren">(</span><em>param</em>, <em>cols</em>, <em>binning_obj</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVValueSelectFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVValueSelectFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>Drop the columns if their iv is smaller than a threshold</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>param</strong> (<em>IVSelectionParam object</em><em>,</em>) – Parameters that user set.</li>
<li><strong>cols</strong> (<em>list of int</em>) – Specify header of guest variances.</li>
<li><strong>binning_obj</strong> (<em>Binning object</em>) – Use for collecting iv among all parties.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.IVValueSelectFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVValueSelectFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVValueSelectFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.IVValueSelectFilter.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVValueSelectFilter.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVValueSelectFilter.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.IVValueSelectFilter.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#IVValueSelectFilter.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.IVValueSelectFilter.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.OutlierFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">OutlierFilter</code><span class="sig-paren">(</span><em>params</em>, <em>cols</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#OutlierFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.OutlierFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>Given percentile and threshold. Judge if this quantile point is larger than threshold. Filter those larger ones.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>params</strong> (<em>OutlierColsSelectionParam object</em><em>,</em>) – Parameters that user set.</li>
<li><strong>cols</strong> (<em>list of int</em>) – Specify which column(s) need to apply this filter method. -1 means do binning for all columns.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.OutlierFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances</em>, <em>bin_param=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#OutlierFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.OutlierFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.OutlierFilter.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#OutlierFilter.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.OutlierFilter.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.OutlierFilter.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#OutlierFilter.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.OutlierFilter.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.UnionPercentileFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">UnionPercentileFilter</code><span class="sig-paren">(</span><em>local_variance</em>, <em>host_variances</em>, <em>percentile</em>, <em>pick_high=True</em>, <em>header=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UnionPercentileFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UnionPercentileFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>Use for all union percentile filter methods</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>local_variance</strong> (<em>list</em><em>,</em>) – The variance of guest party</li>
<li><strong>host_variances</strong> (<em>list</em><em>,</em>) – The variance of guest party</li>
<li><strong>percentile</strong> (<em>float</em>) – The threshold percentile</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.UnionPercentileFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UnionPercentileFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UnionPercentileFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Fit local variances and each host vaiances</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>Useless</em><em>, </em><em>exist for extension</em>) – </td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.UnionPercentileFilter.get_value_threshold">
<code class="descname">get_value_threshold</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UnionPercentileFilter.get_value_threshold"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UnionPercentileFilter.get_value_threshold" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.UnionPercentileFilter.keep_one">
<code class="descname">keep_one</code><span class="sig-paren">(</span><em>variances</em>, <em>left_cols</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UnionPercentileFilter.keep_one"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UnionPercentileFilter.keep_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.feature_selection.UniqueValueFilter">
<em class="property">class </em><code class="descclassname">federatedml.feature.feature_selection.</code><code class="descname">UniqueValueFilter</code><span class="sig-paren">(</span><em>param: federatedml.param.param.UniqueValueParam</em>, <em>cols</em>, <em>statics_obj=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UniqueValueFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UniqueValueFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.feature_selection.FilterMethod" title="federatedml.feature.feature_selection.FilterMethod"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.feature_selection.FilterMethod</span></code></a></p>
<p>filter the columns if all values in this feature is the same</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>param</strong> (<em>UniqueValueParam object</em><em>,</em>) – Parameters that user set.</li>
<li><strong>cols</strong> (<em>list of string</em><em> or </em><em>-1</em>) – Specify which column(s) need to apply binning. -1 means do binning for all columns.</li>
<li><strong>statics_obj</strong> (<em>MultivariateStatisticalSummary object</em><em>, </em><em>default: None</em>) – If those static information has been compute. This can be use as parameter so that no need to
compute again.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.feature_selection.UniqueValueFilter.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UniqueValueFilter.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UniqueValueFilter.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Filter data_instances for the specified columns</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data_instances</strong> (<em>DTable</em><em>,</em>) – Input data</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">A list of index of columns left.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.UniqueValueFilter.get_meta_obj">
<code class="descname">get_meta_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UniqueValueFilter.get_meta_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UniqueValueFilter.get_meta_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.feature_selection.UniqueValueFilter.get_param_obj">
<code class="descname">get_param_obj</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/feature_selection.html#UniqueValueFilter.get_param_obj"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.feature_selection.UniqueValueFilter.get_param_obj" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.imputer">
<span id="federatedml-feature-imputer-module"></span><h2>federatedml.feature.imputer module<a class="headerlink" href="#module-federatedml.feature.imputer" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.imputer.Imputer">
<em class="property">class </em><code class="descclassname">federatedml.feature.imputer.</code><code class="descname">Imputer</code><span class="sig-paren">(</span><em>missing_value_list=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/imputer.html#Imputer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.imputer.Imputer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This class provides basic strategies for values replacement. It can be used as missing filled or outlier replace.
You can use the statistics such as mean, median or max of each column to fill the missing value or replace outlier.</p>
<dl class="method">
<dt id="federatedml.feature.imputer.Imputer.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data</em>, <em>replace_method=None</em>, <em>replace_value=None</em>, <em>output_format='origin'</em>, <em>quantile=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/imputer.html#Imputer.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.imputer.Imputer.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply imputer for input data
:param data:
:type data: DTable, each data’s value should be list
:param replace_method:
:type replace_method: str, the strategy of imputer, like min, max, mean or designated and so on. Default None
:param replace_value:
:type replace_value: str, if replace_method is designated, you should assign the replace_value which will be used to replace the value in imputer_value_list
:param output_format:
:type output_format: str, the output data format. The output data can be ‘str’, ‘int’, ‘float’. Default origin, the original format as input data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
<li><strong>fit_data</strong> (<em>data_instance, data after imputer</em>)</li>
<li><strong>cols_transform_value</strong> (<em>list, the replace value in each column</em>)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.imputer.Imputer.get_impute_rate">
<code class="descname">get_impute_rate</code><span class="sig-paren">(</span><em>mode='fit'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/imputer.html#Imputer.get_impute_rate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.imputer.Imputer.get_impute_rate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.imputer.Imputer.get_missing_value_list">
<code class="descname">get_missing_value_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/imputer.html#Imputer.get_missing_value_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.imputer.Imputer.get_missing_value_list" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.imputer.Imputer.transform">
<code class="descname">transform</code><span class="sig-paren">(</span><em>data</em>, <em>transform_value</em>, <em>output_format='origin'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/imputer.html#Imputer.transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.imputer.Imputer.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Transform input data using Imputer with fit results
:param data:
:type data: DTable, each data’s value should be list
:param output_format:
:type output_format: str, the output data format. The output data can be ‘str’, ‘int’, ‘float’. Default origin, the original format as input data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>transform_data</strong></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">data_instance, data after transform</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.instance">
<span id="federatedml-feature-instance-module"></span><h2>federatedml.feature.instance module<a class="headerlink" href="#module-federatedml.feature.instance" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.instance.Instance">
<em class="property">class </em><code class="descclassname">federatedml.feature.instance.</code><code class="descname">Instance</code><span class="sig-paren">(</span><em>inst_id=None</em>, <em>weight=1.0</em>, <em>features=None</em>, <em>label=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/instance.html#Instance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.instance.Instance" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Instance object use in all algorithm module</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>inst_id</strong> (<em>int</em><em>, </em><em>the id of the instance</em><em>, </em><em>reserved fields in this version</em>) – </li>
<li><strong>weight</strong> (<em>float</em><em>, </em><em>the weight of the instance</em>) – </li>
<li><strong>feature</strong> (<em>object</em><em>, </em><em>ndarray</em><em> or </em><em>SparseVector Object in this version</em>) – </li>
<li><strong>label</strong> (<em>None of float</em><em>, </em><em>data label</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.instance.Instance.set_feature">
<code class="descname">set_feature</code><span class="sig-paren">(</span><em>features</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/instance.html#Instance.set_feature"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.instance.Instance.set_feature" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.instance.Instance.set_label">
<code class="descname">set_label</code><span class="sig-paren">(</span><em>label=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/instance.html#Instance.set_label"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.instance.Instance.set_label" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.instance.Instance.set_weight">
<code class="descname">set_weight</code><span class="sig-paren">(</span><em>weight=1.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/instance.html#Instance.set_weight"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.instance.Instance.set_weight" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.min_max_scaler">
<span id="federatedml-feature-min-max-scaler-module"></span><h2>federatedml.feature.min_max_scaler module<a class="headerlink" href="#module-federatedml.feature.min_max_scaler" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.min_max_scaler.MinMaxScaler">
<em class="property">class </em><code class="descclassname">federatedml.feature.min_max_scaler.</code><code class="descname">MinMaxScaler</code><span class="sig-paren">(</span><em>mode='normal'</em>, <em>area='all'</em>, <em>feat_upper=None</em>, <em>feat_lower=None</em>, <em>out_upper=None</em>, <em>out_lower=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/min_max_scaler.html#MinMaxScaler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.min_max_scaler.MinMaxScaler" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="docutils">
<dt>Transforms features by scaling each feature to a given range,e.g.between minimum and maximum. The transformation is given by:</dt>
<dd>X_scale = (X - X.min) / (X.max - X.min), while X.min is the minimum value of feature, and X.max is the maximum</dd>
</dl>
<dl class="method">
<dt id="federatedml.feature.min_max_scaler.MinMaxScaler.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/min_max_scaler.html#MinMaxScaler.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.min_max_scaler.MinMaxScaler.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply min-max scale for input data
:param data:
:type data: data_instance, input data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
<li><strong>fit_data</strong> (<em>data_instance, data after scale</em>)</li>
<li><strong>cols_transform_value</strong> (<em>list of tuple, each tuple include minimum, maximum, output_minimum, output maximum</em>)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.min_max_scaler.MinMaxScaler.transform">
<code class="descname">transform</code><span class="sig-paren">(</span><em>data</em>, <em>cols_transform_value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/min_max_scaler.html#MinMaxScaler.transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.min_max_scaler.MinMaxScaler.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Transform input data using min-max scale with fit results
:param data:
:type data: data_instance, input data
:param cols_transform_value:
:type cols_transform_value: list of tuple, the return of fit function. Each tuple include minimum, maximum, output_minimum, output maximum</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>transform_data</strong></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">data_instance, data after transform</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.one_hot_encoder">
<span id="federatedml-feature-one-hot-encoder-module"></span><h2>federatedml.feature.one_hot_encoder module<a class="headerlink" href="#module-federatedml.feature.one_hot_encoder" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder">
<em class="property">class </em><code class="descclassname">federatedml.feature.one_hot_encoder.</code><code class="descname">OneHotEncoder</code><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="federatedml.html#federatedml.model_base.ModelBase" title="federatedml.model_base.ModelBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.model_base.ModelBase</span></code></a></p>
<dl class="method">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.export_model">
<code class="descname">export_model</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.export_model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.export_model" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data_instances</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.fit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.merge_col_maps">
<em class="property">static </em><code class="descname">merge_col_maps</code><span class="sig-paren">(</span><em>col_map1</em>, <em>col_map2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.merge_col_maps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.merge_col_maps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.record_new_header">
<em class="property">static </em><code class="descname">record_new_header</code><span class="sig-paren">(</span><em>data</em>, <em>cols</em>, <em>header</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.record_new_header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.record_new_header" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a new schema based on data value. Each new value will generate a new header.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>col_maps</strong></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">a dict in which keys are original header, values are dicts. The dicts in value</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.set_schema">
<code class="descname">set_schema</code><span class="sig-paren">(</span><em>data_instance</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.set_schema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.set_schema" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.transfer_one_instance">
<em class="property">static </em><code class="descname">transfer_one_instance</code><span class="sig-paren">(</span><em>instance</em>, <em>col_maps</em>, <em>ori_header</em>, <em>transformed_header</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.transfer_one_instance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.transfer_one_instance" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.one_hot_encoder.OneHotEncoder.transform">
<code class="descname">transform</code><span class="sig-paren">(</span><em>data_instances</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/one_hot_encoder.html#OneHotEncoder.transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.one_hot_encoder.OneHotEncoder.transform" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.quantile">
<span id="federatedml-feature-quantile-module"></span><h2>federatedml.feature.quantile module<a class="headerlink" href="#module-federatedml.feature.quantile" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.quantile.Quantile">
<em class="property">class </em><code class="descclassname">federatedml.feature.quantile.</code><code class="descname">Quantile</code><span class="sig-paren">(</span><em>params</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.convert_feature_to_bin">
<em class="property">static </em><code class="descname">convert_feature_to_bin</code><span class="sig-paren">(</span><em>data_instance</em>, <em>method</em>, <em>bin_num=32</em>, <em>bin_gap=1e-06</em>, <em>bin_sample_num=10000</em>, <em>valid_features=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.convert_feature_to_bin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.convert_feature_to_bin" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert instance’s features to binning, use for secureboost only in this version</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data_instance</strong> (<em>DTable</em>) – The input data</li>
<li><strong>method</strong> (<em>str</em><em>, </em><em>accepted &quot;bin_by_sample_data&quot;</em><em>, </em><em>&quot;bin_by_data_block&quot; only</em>) – <dl class="docutils">
<dt>if method is “bin_by_sample_data”, if will sample bin_sample_num amount of data,</dt>
<dd>then find split points in such data.</dd>
<dt>if method is “bin_by_data_block”, it will generated split points in each partition of data firstly,</dt>
<dd>then merge split points of all partition and genenerate final split points</dd>
</dl>
</li>
<li><strong>bin_num</strong> (<em>int</em><em>, </em><em>max num of bins each column will generate</em>) – </li>
<li><strong>bin_gap</strong> (<em>float</em><em>, </em><em>the least gap of any two adjacent bin split points</em>) – </li>
<li><strong>bin_sample_num</strong> (<em>int</em><em>, </em><em>use when method is &quot;bin_by_sample_data&quot;</em>) – </li>
<li><strong>valid_features</strong> (<em>None</em><em> or </em><em>list</em><em>,</em>) – if valid_features is not None, it will specify which columns need to binning</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><ul class="simple">
<li><strong>data_bin</strong> (<em>DTable,</em>) – instance, whose features were converted to bins</li>
<li><strong>bin_split_points</strong> (<em>2D numpy’s ndarray,</em>) – split points of each feature need to binning</li>
<li><strong>bin_sparse_points</strong> (<em>1D numpy’s ndarray,</em>) – use for sparse representation, which bin is 0 locate for each feature</li>
</ul>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.convert_instance_to_bin">
<em class="property">static </em><code class="descname">convert_instance_to_bin</code><span class="sig-paren">(</span><em>instance</em>, <em>bin_split_points=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.convert_instance_to_bin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.convert_instance_to_bin" title="Permalink to this definition">¶</a></dt>
<dd><p>Method use by mapValues Api, convert an instance object’s features to bins</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>instance</strong> (<em>Instance Object</em>) – </li>
<li><strong>bin_split_points</strong> (<em>2D numpy's ndarray</em><em>,</em>) – split points of each feature need to binning</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>instance</strong></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Instance Object, the instance object’s features converted to bins</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.find_bin_sparse_points">
<em class="property">static </em><code class="descname">find_bin_sparse_points</code><span class="sig-paren">(</span><em>bin_split_points</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.find_bin_sparse_points"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.find_bin_sparse_points" title="Permalink to this definition">¶</a></dt>
<dd><p>Find out which bin is 0 should be locate for every feature.</p>
<p>If split points is no more than 20, will use brute-force,
else use binary search instead</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>bin_split_points</strong> (<em>2D numpy's ndarray</em>) – the split points of every column</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><strong>bin_sparse_points</strong> – which bin should 0 be for every feature column</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">1D numpy’s ndarray,</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.find_bin_split_points">
<em class="property">static </em><code class="descname">find_bin_split_points</code><span class="sig-paren">(</span><em>data_instance</em>, <em>method</em>, <em>bin_num=32</em>, <em>bin_gap=1e-06</em>, <em>bin_sample_num=10000</em>, <em>valid_features=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.find_bin_split_points"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.find_bin_split_points" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.gen_bin_by_data_block">
<em class="property">static </em><code class="descname">gen_bin_by_data_block</code><span class="sig-paren">(</span><em>data</em>, <em>bin_num=32</em>, <em>bin_gap=1e-06</em>, <em>valid_features=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.gen_bin_by_data_block"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.gen_bin_by_data_block" title="Permalink to this definition">¶</a></dt>
<dd><p>Find out bin split points of data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data</strong> (<em>list</em><em>, </em><em>element of the list is instance define in federatedml.feature.instance</em>) – </li>
<li><strong>bin_num</strong> (<em>int</em><em>, </em><em>max number of bins each column feature will generate</em>) – </li>
<li><strong>bin_gap</strong> (<em>float</em><em>, </em><em>least gap of two adjacent split points should have</em>) – </li>
<li><strong>valid_features</strong> (<em>None</em><em> or </em><em>list</em><em>,</em>) – if valid_features is not None, it will specify which columns need to binning</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>bin_sparse_points</strong> – which bin should 0 be for every feature column</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">1D numpy’s ndarray,</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.gen_bin_by_merge_data_block">
<em class="property">static </em><code class="descname">gen_bin_by_merge_data_block</code><span class="sig-paren">(</span><em>data_instance</em>, <em>bin_num</em>, <em>bin_gap</em>, <em>valid_features</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.gen_bin_by_merge_data_block"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.gen_bin_by_merge_data_block" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Find out bin split points by firstly use mapParitions interface to get</dt>
<dd>split points of data partition, then merge all split points to
generate final split points.</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data_instance</strong> (<em>DTable</em>) – value of each object is instance define in federatedml.feature.instance</li>
<li><strong>bin_num</strong> (<em>int</em><em>, </em><em>max number of bins each column feature will generate</em>) – </li>
<li><strong>bin_gap</strong> (<em>float</em><em>, </em><em>least gap of two adjacent split points should have</em>) – </li>
<li><strong>bin_sample_num</strong> (<em>int</em><em>, </em><em>max number of data to be sample to generate bin split points</em>) – </li>
<li><strong>valid_features</strong> (<em>None</em><em> or </em><em>list</em><em>,</em>) – if valid_features is not None, it will specify which columns need to binning</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>bin_sparse_points</strong> – which bin should 0 be for every feature column</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">1D numpy’s ndarray,</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.gen_bin_by_sample_data">
<em class="property">static </em><code class="descname">gen_bin_by_sample_data</code><span class="sig-paren">(</span><em>data_instance</em>, <em>bin_num=32</em>, <em>bin_gap=1e-06</em>, <em>bin_sample_num=32</em>, <em>valid_features=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.gen_bin_by_sample_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.gen_bin_by_sample_data" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Find out bin split points by firstly sample bin_sample_num amount of data,</dt>
<dd>then use these data to generate bin split points.</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data_instance</strong> (<em>DTable</em>) – value of each object is instance define in federatedml.feature.instance</li>
<li><strong>bin_num</strong> (<em>int</em><em>, </em><em>max number of bins each column feature will generate</em>) – </li>
<li><strong>bin_gap</strong> (<em>float</em><em>, </em><em>least gap of two adjacent split points should have</em>) – </li>
<li><strong>valid_features</strong> (<em>None</em><em> or </em><em>list</em><em>,</em>) – if valid_features is not None, it will specify which columns need to binning</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>bin_sparse_points</strong> – which bin should 0 be for every feature column</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">1D numpy’s ndarray,</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.generate_bin_by_batch">
<em class="property">static </em><code class="descname">generate_bin_by_batch</code><span class="sig-paren">(</span><em>param_list</em>, <em>key_value_tuples</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.generate_bin_by_batch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.generate_bin_by_batch" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.merge_bin_split_points">
<em class="property">static </em><code class="descname">merge_bin_split_points</code><span class="sig-paren">(</span><em>bin_split_point_list</em>, <em>bin_num=32</em>, <em>bin_gap=1e-06</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.merge_bin_split_points"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.merge_bin_split_points" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="federatedml.feature.quantile.Quantile.sample_data">
<em class="property">static </em><code class="descname">sample_data</code><span class="sig-paren">(</span><em>data_instance</em>, <em>bin_sample_num=10000</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile.html#Quantile.sample_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile.Quantile.sample_data" title="Permalink to this definition">¶</a></dt>
<dd><p>sample data from a dtable</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>data_instance</strong> (<em>DTable</em>) – The input data</li>
<li><strong>bin_sample_num</strong> (<em>int</em><em>, </em><em>max number of data to be sample to generate bin split points</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>sample_data</strong></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list, element is a (id, instance) tuple</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.quantile_summaries">
<span id="federatedml-feature-quantile-summaries-module"></span><h2>federatedml.feature.quantile_summaries module<a class="headerlink" href="#module-federatedml.feature.quantile_summaries" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.quantile_summaries.QuantileSummaries">
<em class="property">class </em><code class="descclassname">federatedml.feature.quantile_summaries.</code><code class="descname">QuantileSummaries</code><span class="sig-paren">(</span><em>compress_thres=10000</em>, <em>head_size=10000</em>, <em>error=0.001</em>, <em>abnormal_list=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#QuantileSummaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.QuantileSummaries" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="federatedml.feature.quantile_summaries.QuantileSummaries.compress">
<code class="descname">compress</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#QuantileSummaries.compress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.QuantileSummaries.compress" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.QuantileSummaries.insert">
<code class="descname">insert</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#QuantileSummaries.insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.QuantileSummaries.insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert an observation of data. First store in a array buffer. If the buffer is full,
do a batch insert. If the size of sampled list reach compress_thres, compress this list.
:param x: The observation that prepare to insert
:type x: float</p>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.QuantileSummaries.merge">
<code class="descname">merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#QuantileSummaries.merge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.QuantileSummaries.merge" title="Permalink to this definition">¶</a></dt>
<dd><p>merge current summeries with the other one.
:param other: The summaries to be merged
:type other: QuantileSummaries</p>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.QuantileSummaries.query">
<code class="descname">query</code><span class="sig-paren">(</span><em>quantile</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#QuantileSummaries.query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.QuantileSummaries.query" title="Permalink to this definition">¶</a></dt>
<dd><p>Given the queried quantile, return the approximation guaranteed result
:param quantile: The target quantile
:type quantile: float [0.0, 1.0]</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float, the corresponding value result.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries">
<em class="property">class </em><code class="descclassname">federatedml.feature.quantile_summaries.</code><code class="descname">SparseQuantileSummaries</code><span class="sig-paren">(</span><em>compress_thres=10000</em>, <em>head_size=10000</em>, <em>error=0.001</em>, <em>abnormal_list=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#SparseQuantileSummaries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#federatedml.feature.quantile_summaries.QuantileSummaries" title="federatedml.feature.quantile_summaries.QuantileSummaries"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.feature.quantile_summaries.QuantileSummaries</span></code></a></p>
<dl class="method">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.insert">
<code class="descname">insert</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#SparseQuantileSummaries.insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert an observation of data. First store in a array buffer. If the buffer is full,
do a batch insert. If the size of sampled list reach compress_thres, compress this list.
:param x: The observation that prepare to insert
:type x: float</p>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.merge">
<code class="descname">merge</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#SparseQuantileSummaries.merge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.merge" title="Permalink to this definition">¶</a></dt>
<dd><p>merge current summeries with the other one.
:param other: The summaries to be merged
:type other: QuantileSummaries</p>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.query">
<code class="descname">query</code><span class="sig-paren">(</span><em>quantile</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#SparseQuantileSummaries.query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.query" title="Permalink to this definition">¶</a></dt>
<dd><p>Given the queried quantile, return the approximation guaranteed result
:param quantile: The target quantile
:type quantile: float [0.0, 1.0]</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float, the corresponding value result.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.set_total_count">
<code class="descname">set_total_count</code><span class="sig-paren">(</span><em>total_count</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#SparseQuantileSummaries.set_total_count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.set_total_count" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.zero_lower_bound">
<code class="descname">zero_lower_bound</code><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.zero_lower_bound" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="federatedml.feature.quantile_summaries.SparseQuantileSummaries.zero_upper_bound">
<code class="descname">zero_upper_bound</code><a class="headerlink" href="#federatedml.feature.quantile_summaries.SparseQuantileSummaries.zero_upper_bound" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.feature.quantile_summaries.Stats">
<em class="property">class </em><code class="descclassname">federatedml.feature.quantile_summaries.</code><code class="descname">Stats</code><span class="sig-paren">(</span><em>value</em>, <em>g: int</em>, <em>delta: int</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/quantile_summaries.html#Stats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.quantile_summaries.Stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

</div>
<div class="section" id="federatedml-feature-sampler-module">
<h2>federatedml.feature.sampler module<a class="headerlink" href="#federatedml-feature-sampler-module" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="federatedml-feature-scaler-module">
<h2>federatedml.feature.scaler module<a class="headerlink" href="#federatedml-feature-scaler-module" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-federatedml.feature.sparse_vector">
<span id="federatedml-feature-sparse-vector-module"></span><h2>federatedml.feature.sparse_vector module<a class="headerlink" href="#module-federatedml.feature.sparse_vector" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.sparse_vector.SparseVector">
<em class="property">class </em><code class="descclassname">federatedml.feature.sparse_vector.</code><code class="descname">SparseVector</code><span class="sig-paren">(</span><em>indices=None</em>, <em>data=None</em>, <em>shape=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Sparse storage data format of federatedml</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>sparse_vec</strong> (<em>dict</em><em>, </em><em>record</em><em> (</em><em>indice</em><em>, </em><em>data</em><em>) </em><em>kv tuples</em>) – </li>
<li><strong>shape</strong> (<em>the real feature shape of data</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="federatedml.feature.sparse_vector.SparseVector.count_non_zeros">
<code class="descname">count_non_zeros</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector.count_non_zeros"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector.count_non_zeros" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.sparse_vector.SparseVector.count_zeros">
<code class="descname">count_zeros</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector.count_zeros"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector.count_zeros" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.sparse_vector.SparseVector.get_all_data">
<code class="descname">get_all_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector.get_all_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector.get_all_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.sparse_vector.SparseVector.get_data">
<code class="descname">get_data</code><span class="sig-paren">(</span><em>pos</em>, <em>default_val=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector.get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector.get_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.feature.sparse_vector.SparseVector.get_shape">
<code class="descname">get_shape</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/sparse_vector.html#SparseVector.get_shape"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.sparse_vector.SparseVector.get_shape" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature.standard_scaler">
<span id="federatedml-feature-standard-scaler-module"></span><h2>federatedml.feature.standard_scaler module<a class="headerlink" href="#module-federatedml.feature.standard_scaler" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.feature.standard_scaler.StandardScaler">
<em class="property">class </em><code class="descclassname">federatedml.feature.standard_scaler.</code><code class="descname">StandardScaler</code><span class="sig-paren">(</span><em>with_mean=True</em>, <em>with_std=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/standard_scaler.html#StandardScaler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.standard_scaler.StandardScaler" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Standardize features by removing the mean and scaling to unit variance. The standard score of a sample x is calculated as:
z = (x - u) / s, where u is the mean of the training samples, and s is the standard deviation of the training samples</p>
<dl class="method">
<dt id="federatedml.feature.standard_scaler.StandardScaler.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/standard_scaler.html#StandardScaler.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.standard_scaler.StandardScaler.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply standard scale for input data
:param data:
:type data: data_instance, input data</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
<li><strong>data</strong> (<em>data_instance, data after scale</em>)</li>
<li><strong>mean</strong> (<em>list, each column mean value</em>)</li>
<li><strong>std</strong> (<em>list, each column standard deviation</em>)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.feature.standard_scaler.StandardScaler.transform">
<code class="descname">transform</code><span class="sig-paren">(</span><em>data</em>, <em>mean</em>, <em>scale</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/feature/standard_scaler.html#StandardScaler.transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.feature.standard_scaler.StandardScaler.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Transform input data using standard scale with fit results
:param data:
:type data: data_instance, input data
:param mean:
:type mean: list, each column mean value
:param std:
:type std: list, each column standard deviation</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>transform_data</strong></td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">data_instance, data after transform</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.feature">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-federatedml.feature" title="Permalink to this headline">¶</a></h2>
</div>
</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, FATE_TEAM

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>